#include <iostream>
using namespace std;

template <typename T>
class A {
private:
	T a, b, c;
public:
	A(T x, T y, T z);
	T GetSum();
};

template <typename T>
A<T>::A(T x, T y, T z) : a(x), b(y), c(z)
{
}

template <typename T>
T A<T>::GetSum()
{
	return a + b + c;
}

int main()
{
	A <int>a(1, 2, 3);
	cout << a.GetSum() << endl;
	A <double>b(1.1, 2.2, 3.3);
	cout << b.GetSum() << endl;
}
